#pragma once

#include "State.h"
#include "Application.h"
#include "Scene.h"

namespace RyForce
{
	class GameState : public State<Application>, public OIS::KeyListener, public OIS::MouseListener
	{
	public:

		GameState(Application*, std::string _name = "GameState");
		
		virtual void enter();

		virtual void exit();

		virtual bool pause() ;

		virtual void resume() ;

		virtual void update(double timeSinceLastFrame);

		virtual void postFrame();

		virtual ~GameState(){};

		bool keyPressed(const OIS::KeyEvent &keyEventRef);

		bool keyReleased(const OIS::KeyEvent &keyEventRef);

		bool mouseMoved(const OIS::MouseEvent &arg);
		bool mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id); 
		bool mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id);


	private:
		
		void		processUnbufferKeyInput();


		Ogre::Camera*			mCamera;
		Ogre::SceneManager*		mSceneMgr;
		bool						mIsLMouseDown, mIsRMouseDown;

		double						mMoveScale, mMoveSpeed;
		Ogre::Vector3			mTranslateVector;
		Scene*						mScene;
	};

}